# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
  def app_name
    client_name
  end
  
  def client_name
	  "Squash Ladder"
  end
  
  def email_administrator
	  "Administrator"
  end
  
  def url_address
	  "http://squash.redjamjar.net"
  end
  
  def webmaster_email
	  WEBMASTER_EMAIL
  end
  
  def svn_revision
	  SVN_REVISION
  end
  
  def svn_date
	  SVN_DATE
  end
  
  def users_fullname
    if logged_in?
      return "#{current_user.first_name.capitalize} #{current_user.surname.capitalize}"
    end
  end
  
  def admin?
    # first check that there is even someone logged in?
    
    if logged_in?
      return current_user.login.downcase == 'admin' ? true : false
    end
  end
end
